home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS Toolkit
/
BBS Toolkit.iso
/
rbbs_pc
/
rbbsdocs.zip
/
RBBSDOCS.APA
< prev
next >
Wrap
Text File
|
1990-11-05
|
14KB
|
277 lines
APPENDIX A -- RBBS-PC Record Formats A-1
APPENDICES
APPENDIX A -- RBBS-PC Record Formats
------------------------------------
This appendix is intended to document the record formats of some of the
more significant records used within RBBS-PC. As such, it is intended more
as a "programmers' guide" for those who wish to write RBBS-PC utilities
rather than as "user documentation." No record format is "sacrosanct" and
any of them may be changed in future releases. However such changes are
not made capriciously and, when they are made, are accompanied by some
utility program that will allow the old files to be reformatted into the
new format.
The MESSAGES file contains the messages that have been left on RBBS-PC. It
is a random access file with 128-byte records. The first record of the
MESSAGES file acts as RBBS-PC's "checkpoint" record. The records
immediately following this first record are the RBBS-PC "node" records.
Each "node" record represents the activity/options associated with a
particular copy of RBBS-PC ("node"). There can be up to thirty-six copies
of RBBS-PC running simultaneously, therefore there can be up to thirty-six
"node" records following the "checkpoint" record.
The MESSAGES file has the following logical format:
+----------------------------------------------+
Record #1 | RBBS-PC "checkpoint" record |
+----------------------------------------------+
Record #2 | RBBS-PC "node" record for node # 1 |
| |
| up to |
| |
| RBBS-PC "node" record for node # 9 |
| RBBS-PC "node" record for node # 0 |
| RBBS-PC "node" record for node "A" |
| |
| up to |
| RBBS-PC "node" record for node "Z" |
| |
+----------------------------------------------+
| First Record in Message portion of file |
+----------------------------------------------+
| |
\ Message records that have been used \
\ \
| |
+----------------------------------------------+
| Record available for next message |
+----------------------------------------------+
| Last record available in MESSAGES file |
+----------------------------------------------+
The FIRST RECORD of the "MESSAGES" file acts as a "checkpoint" record for
all the multiple RBBS-PC's that may be sharing the MESSAGES and USERS
files. It contains information critical to maintaining the integrity of
these two files. The layout of RBBS-PC Message File Record Number 1 is
as follows:
Position Length Description
1 - 8 8 Number assigned to the last message entered
RBBS-PC 17.3A TECHNICAL REFERENCE MANUAL A-2
9 - 10 2 Security level required to be auto-added to a conference
11 - 20 10 Current caller number
21 - 56 36 --- RESERVED FOR FUTURE USE ----
57 - 61 5 Count of the number of USER records used
62 - 67 6 --- RESERVED FOR FUTURE USE ----
68 - 74 7 Record Number where "messages" portion of the
MESSAGES file begins
75 - 81 7 Record Number of the next available record in the
MESSAGES file where the next message may be written
82 - 88 7 Record Number of the last record in the MESSAGES file
89 - 95 7 Maximum number of messages allowed in the MESSAGES file
96 -126 31 --- RESERVED FOR FUTURE USE ----
127 -128 2 Maximum number of RBBS-PC's sharing this MESSAGES file
As a programming reference, line numbers 1900 and 23000 of the BASIC source
code for RBBS-PC.BAS contains the code for reading this "checkpoint"
record.
Following the first record of the MESSAGES file are from one to 36 "node"
records. Each "node" record contains information critical to the
running of that copy of RBBS-PC associated with that "node". The layout of
each RBBS-PC "node" record is as follows:
Position Length Description
1 - 31 31 Name of last person on this copy of RBBS-PC
32 - 33 2 SysOp available indicator (true or false)
34 - 35 2 SysOp annoy indicator (true or false)
36 - 37 2 SysOp is to be on next indicator (true or false)
38 - 39 2 Line printer available indicator (true or false)
40 - 41 2 Door's availability indicator (true or false)
42 - 43 2 Eight bit transmission indicator (true or false)
44 - 45 2 Caller's baud rate indicator: -1 = 300 bps
-2 = 450 bps
-3 = 1200 bps
-4 = 2400 bps
-5 = 4800 bps
-6 = 9600 bps
-7 = 19200 bps
-8 = 38400 bps
46 - 47 2 Upper case only indicator (true or false)
48 - 51 4 Number of bytes transferred (from external protocols)
52 1 Batch transfer indicator (not zero = batch)
53 - 54 2 Graphics indicator (0 = text, 1 = full ASCII, 2 = color)
55 - 56 2 SysOp indicator (-1 = SysOp)
57 1 Activity indicator (I=inactive, A=active)
58 - 59 2 SNOOP on indicator (true or false)
60 - 64 5 Baud that RBBS-PC talks to the modem at (single precision)
65 - 67 3 Time user logged onto the system (HH:MM:SS)
68 - 71 4 --- RESERVED FOR FUTURE USE ---
72 - 73 2 Private door indicator (true or false)
74 1 Type of transfer to external program:
0 = none
1 = download a file
2 = upload a file
3 = external registration program
75 1 First letter of file transfer protocol
76 1 --- RESERVED FOR FUTURE USE ----
77 - 78 2 Last date, MM-DD-YY, that RBBS-PC exited to DOS (packed)
APPENDIX A -- RBBS-PC Record Formats A-3
79 - 85 7 --- RESERVED FOR FUTURE USE ----
86 - 90 5 Last time, HH:MM, that RBBS-PC exited to DOS
91 - 92 2 Reliable mode indicator (true or false)
93 - 116 24 Work area that normally contains caller's City and State,
but when temporarily exiting RBBS-PC used as:
Position Length Description
93 -100 8 Programmable user interface file name
101 -102 2 Local user indicator (2 hex 0Ds if local)
103 -104 2 Local user mode (true if using COM0)
105 -112 8 Name of current "conference" or "sub-board"
113 -114 2 Time credits (minutes)
115 -116 2 --- UNUSED ----
117 -118 2 Subsystem index of last subsystem user was in.
119 -124 6 Month, day, and year, MMDDYY, exited to external protocol
125 -128 4 Hour and minute, HHMM, exited to external protocol
As a programming reference and in order to see how these fields are
set/used in the node records, review the following line numbers in RBBS-
PC.BAS -- 150, 200, 400, 420, 842, and 13555. In addition, review the
following subroutines as well:
Source Code Subroutine
RBBSSUB2.BAS ---- WhosOn
RBBSSUB3.BAS ---- FindFKey
SaveProf
ReadProf
RBBSSUB4.BAS ---- TimedOut
A message within the messages file consists of a MESSAGE HEADER followed by
the text of the message. The RBBS-PC Message File "message header" record
layout is as follows:
Position Length Description
1 1 Contains an "*" for read-only messages, blank otherwise
2 - 5 4 Message number of this message
6 - 36 31 The name of the person the message is from
37 - 58 22 The name of the person to whom the message is sent
59 - 66 8 Time of day that the message was sent (HH:MM:SS)
67 - 67 1 ---- RESERVED FOR FUTURE USE ----
68 - 75 8 Date the message was sent (MM-DD-YY)
76 -100 25 Subject of the message
101 -115 15 Password for the message (if any)
116 -116 1 "Active" message indicator = ASCII 225
"Killed" message indicator = ASCII 226
117 -120 4 Number of 128-byte records for this message --
including the "message header" record.
121 -122 2 Minimum security level to read message
123 -125 3 Date (packed) the message was last read (MM/DD/YY)
126 -128 3 Time (packed) the message was last read (HH:MM:SS)
As a programming reference, review lines 3405, 3460, 3530, and 8076 of the
BASIC source code for RBBS-PC.BAS to see how these fields are set. Each
record following the MESSAGE HEADER record is a MESSAGE TEXT record and
consists of 128 characters. Each of these 128-byte message text" records
contains the message text. The end of each line in the message is followed
by an RBBS-PC "end-of-line" indicator which is equal to an ASCII 227. This
allows RBBS-PC to "pack" multiple message lines in a single 128-byte
record.
RBBS-PC 17.3A TECHNICAL REFERENCE MANUAL A-4
Information unique to each person who logs on is contained in the USERS
file (a random file of 128-byte records). Each records is as follows:
Position Length Description
1 - 31 31 Users first and last name (separated by a blank).
32 - 46 15 Users password for logon.
47 - 48 2 Users security level (permanent).
49 - 62 14 Users logon options (see detail breakdown below).
63 - 86 24 City and state from which the user is calling.
87 - 89 3 ---- RESERVED FOR FUTURE USE ----
90 - 93 4 Number of files downloaded today
94 - 97 4 Number of bytes downloaded today
98 -101 4 Number of bytes downloaded (ever).
102 -105 4 Number of bytes uploaded (ever).
106 -119 14 Date and time the user was last on (MM-DD-YY HH:MM).
120 -122 3 Date the user last listed a directory.
123 -124 2 Number of files downloaded (ever).
125 -126 2 Number of files uploaded (ever).
127 -128 2 Elapsed time the user was on for day of last access.
Line 9400 of the BASIC source code for RBBS- PC.BAS contains the code for
opening this file. The user's logon options, positions 49 through 62, are
utilized as follows:
Position Length Description
49 - 50 2 Number of times the user has logged on
51 - 52 2 Last message number read by the user
53 1 Protocol Preference (blank if none, otherwise letter)
54 1 Graphics Preference (see meaning below)
55 - 56 2 Margin length for this users messages
57 - 58 2 Bit Flag -- this 16-bit field is denoted by bit 0 being
the least significant (i.e. right-most bit) and bit 15 being the most
significant (i.e. left-most bit). These "bit flags" have the following
meanings (0=off, 1=on):
BIT Definition (what ON means)
0 Bell prompts
1 "Expert" mode
2 Nulls
3 Upper case only
4 Line feeds
5 Skip old bulletins
6 Check new files on logon
7 Use autodownload
8 Required questionnaire answered
9 Mail Waiting
10 Highlighting enabled
11 "TurboKey" enabled
12-15 RESERVED FOR FUTURE USE
59 - 60 2 Date subscription began
61 1 Page length to use for this users terminal
62 1 ------- RESERVED FOR FUTURE USE ---------
---
14
The meaning of the graphics preference byte depends on the numeric value it
has. The caller can specify, for text files, no graphics, ascii graphics,
or ansi color graphics; then the color, and then whether normal or bold.
APPENDIX A -- RBBS-PC Record Formats A-5
For example, if graphics preference for text files is color, and preference
for normal text is light yellow, graphics preference stored is 38. Colors
are Red, Green, Yellow, Blue, Purple, Cyan, and White.
normal bold
graphics\color R G Y B P C W R G Y B P C W
none ...... 30 33 36 39 42 45 48 | 51 54 57 60 63 66 69
ascii ...... 31 34 37 40 43 46 49 | 52 55 58 61 64 67 70
ansi ...... 32 35 38 41 44 47 50 | 53 56 59 62 65 68 71